const mongoose = require('./fu_db')

const userSchema = new mongoose.Schema({
    name: String,
    age: Number,
    email: String,
    password: String
})

const loginsSchema = new mongoose.Schema({
    phone: String,
    password: String,
    seconds: String,
    arater: {
        type: String,
        default: 'https://c-ssl.dtstatic.com/uploads/blog/202304/15/20230415081411_9a88c.thumb.400_0.jpg'
    }
})

const Fu_user = mongoose.model('fu_user', userSchema, 'fu_user')
const loginModel = mongoose.model('loginyf', loginsSchema, 'loginyf')


const listSchema=mongoose.Schema({
    name:String,
    img:String,
    address:String,
    clock:Number,
    price:Number,
    state:Number,
    dis:Number,
    shop:{
        type:mongoose.Schema.Types.ObjectId,
        ref:'wsyshop'
    }
})
const wsyList=mongoose.model('wsylist',listSchema,'wsylist')

const shopSchema=mongoose.Schema({
    name:String,
    img:String,
    
})
const wsyshop=mongoose.model('wsyshop',shopSchema,'wsyshop')


module.exports = {
    Fu_user,
    loginModel,
    wsyList,
    wsyshop
}